3.2 \(\int \frac{\sin ^3(x)}{a+b \cos (x)+c \cos ^2(x)} \, dx\)

Optimal. Leaf size=76 \[ -\frac{\left (b^2-2 c (a+c)\right ) \tanh ^{-1}\left (\frac{b+2 c \cos (x)}{\sqrt{b^2-4 a c}}\right )}{c^2 \sqrt{b^2-4 a c}}-\frac{b \log \left (a+b \cos (x)+c \cos ^2(x)\right )}{2 c^2}+\frac{\cos (x)}{c} \]

[Out]

-(((b^2 - 2*c*(a + c))*ArcTanh[(b + 2*c*Cos[x])/Sqrt[b^2 - 4*a*c]])/(c^2*Sqrt[b^2 - 4*a*c])) + Cos[x]/c - (b*L
og[a + b*Cos[x] + c*Cos[x]^2])/(2*c^2)

________________________________________________________________________________________

Rubi [A]  time = 0.129778, antiderivative size = 76, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.316, Rules used = {3259, 1657, 634, 618, 206, 628} \[ -\frac{\left (b^2-2 c (a+c)\right ) \tanh ^{-1}\left (\frac{b+2 c \cos (x)}{\sqrt{b^2-4 a c}}\right )}{c^2 \sqrt{b^2-4 a c}}-\frac{b \log \left (a+b \cos (x)+c \cos ^2(x)\right )}{2 c^2}+\frac{\cos (x)}{c} \]

Antiderivative was successfully verified.

[In]

Int[Sin[x]^3/(a + b*Cos[x] + c*Cos[x]^2),x]

[Out]

-(((b^2 - 2*c*(a + c))*ArcTanh[(b + 2*c*Cos[x])/Sqrt[b^2 - 4*a*c]])/(c^2*Sqrt[b^2 - 4*a*c])) + Cos[x]/c - (b*L
og[a + b*Cos[x] + c*Cos[x]^2])/(2*c^2)

Rule 3259

Int[((a_.) + (b_.)*(cos[(d_.) + (e_.)*(x_)]*(f_.))^(n_.) + (c_.)*(cos[(d_.) + (e_.)*(x_)]*(f_.))^(n2_.))^(p_.)
*sin[(d_.) + (e_.)*(x_)]^(m_.), x_Symbol] :> Module[{g = FreeFactors[Cos[d + e*x], x]}, -Dist[g/e, Subst[Int[(
1 - g^2*x^2)^((m - 1)/2)*(a + b*(f*g*x)^n + c*(f*g*x)^(2*n))^p, x], x, Cos[d + e*x]/g], x]] /; FreeQ[{a, b, c,
 d, e, f, n, p}, x] && EqQ[n2, 2*n] && IntegerQ[(m - 1)/2]

Rule 1657

Int[(Pq_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x + c*x^2)^p, x
], x] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{\sin ^3(x)}{a+b \cos (x)+c \cos ^2(x)} \, dx &=-\operatorname{Subst}\left (\int \frac{1-x^2}{a+b x+c x^2} \, dx,x,\cos (x)\right )\\ &=-\operatorname{Subst}\left (\int \left (-\frac{1}{c}+\frac{a+c+b x}{c \left (a+b x+c x^2\right )}\right ) \, dx,x,\cos (x)\right )\\ &=\frac{\cos (x)}{c}-\frac{\operatorname{Subst}\left (\int \frac{a+c+b x}{a+b x+c x^2} \, dx,x,\cos (x)\right )}{c}\\ &=\frac{\cos (x)}{c}-\frac{b \operatorname{Subst}\left (\int \frac{b+2 c x}{a+b x+c x^2} \, dx,x,\cos (x)\right )}{2 c^2}+\frac{\left (b^2-2 c (a+c)\right ) \operatorname{Subst}\left (\int \frac{1}{a+b x+c x^2} \, dx,x,\cos (x)\right )}{2 c^2}\\ &=\frac{\cos (x)}{c}-\frac{b \log \left (a+b \cos (x)+c \cos ^2(x)\right )}{2 c^2}-\frac{\left (b^2-2 c (a+c)\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c \cos (x)\right )}{c^2}\\ &=-\frac{\left (b^2-2 c (a+c)\right ) \tanh ^{-1}\left (\frac{b+2 c \cos (x)}{\sqrt{b^2-4 a c}}\right )}{c^2 \sqrt{b^2-4 a c}}+\frac{\cos (x)}{c}-\frac{b \log \left (a+b \cos (x)+c \cos ^2(x)\right )}{2 c^2}\\ \end{align*}

Mathematica [A]  time = 0.256545, size = 131, normalized size = 1.72 \[ \frac{2 c \cos (x) \sqrt{b^2-4 a c}+\left (-b \sqrt{b^2-4 a c}-2 c (a+c)+b^2\right ) \log \left (\sqrt{b^2-4 a c}-b-2 c \cos (x)\right )-\left (b \sqrt{b^2-4 a c}-2 c (a+c)+b^2\right ) \log \left (\sqrt{b^2-4 a c}+b+2 c \cos (x)\right )}{2 c^2 \sqrt{b^2-4 a c}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[x]^3/(a + b*Cos[x] + c*Cos[x]^2),x]

[Out]

(2*c*Sqrt[b^2 - 4*a*c]*Cos[x] + (b^2 - 2*c*(a + c) - b*Sqrt[b^2 - 4*a*c])*Log[-b + Sqrt[b^2 - 4*a*c] - 2*c*Cos
[x]] - (b^2 - 2*c*(a + c) + b*Sqrt[b^2 - 4*a*c])*Log[b + Sqrt[b^2 - 4*a*c] + 2*c*Cos[x]])/(2*c^2*Sqrt[b^2 - 4*
a*c])

________________________________________________________________________________________

Maple [A]  time = 0.02, size = 141, normalized size = 1.9 \begin{align*}{\frac{\cos \left ( x \right ) }{c}}-{\frac{b\ln \left ( a+b\cos \left ( x \right ) +c \left ( \cos \left ( x \right ) \right ) ^{2} \right ) }{2\,{c}^{2}}}-2\,{\frac{a}{c\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{b+2\,c\cos \left ( x \right ) }{\sqrt{4\,ac-{b}^{2}}}} \right ) }-2\,{\frac{1}{\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{b+2\,c\cos \left ( x \right ) }{\sqrt{4\,ac-{b}^{2}}}} \right ) }+{\frac{{b}^{2}}{{c}^{2}}\arctan \left ({(b+2\,c\cos \left ( x \right ) ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)^3/(a+b*cos(x)+c*cos(x)^2),x)

[Out]

cos(x)/c-1/2*b*ln(a+b*cos(x)+c*cos(x)^2)/c^2-2/c/(4*a*c-b^2)^(1/2)*arctan((b+2*c*cos(x))/(4*a*c-b^2)^(1/2))*a-
2/(4*a*c-b^2)^(1/2)*arctan((b+2*c*cos(x))/(4*a*c-b^2)^(1/2))+1/c^2/(4*a*c-b^2)^(1/2)*arctan((b+2*c*cos(x))/(4*
a*c-b^2)^(1/2))*b^2

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^3/(a+b*cos(x)+c*cos(x)^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.96448, size = 641, normalized size = 8.43 \begin{align*} \left [-\frac{{\left (b^{2} - 2 \, a c - 2 \, c^{2}\right )} \sqrt{b^{2} - 4 \, a c} \log \left (-\frac{2 \, c^{2} \cos \left (x\right )^{2} + 2 \, b c \cos \left (x\right ) + b^{2} - 2 \, a c + \sqrt{b^{2} - 4 \, a c}{\left (2 \, c \cos \left (x\right ) + b\right )}}{c \cos \left (x\right )^{2} + b \cos \left (x\right ) + a}\right ) - 2 \,{\left (b^{2} c - 4 \, a c^{2}\right )} \cos \left (x\right ) +{\left (b^{3} - 4 \, a b c\right )} \log \left (c \cos \left (x\right )^{2} + b \cos \left (x\right ) + a\right )}{2 \,{\left (b^{2} c^{2} - 4 \, a c^{3}\right )}}, -\frac{2 \,{\left (b^{2} - 2 \, a c - 2 \, c^{2}\right )} \sqrt{-b^{2} + 4 \, a c} \arctan \left (-\frac{\sqrt{-b^{2} + 4 \, a c}{\left (2 \, c \cos \left (x\right ) + b\right )}}{b^{2} - 4 \, a c}\right ) - 2 \,{\left (b^{2} c - 4 \, a c^{2}\right )} \cos \left (x\right ) +{\left (b^{3} - 4 \, a b c\right )} \log \left (c \cos \left (x\right )^{2} + b \cos \left (x\right ) + a\right )}{2 \,{\left (b^{2} c^{2} - 4 \, a c^{3}\right )}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^3/(a+b*cos(x)+c*cos(x)^2),x, algorithm="fricas")

[Out]

[-1/2*((b^2 - 2*a*c - 2*c^2)*sqrt(b^2 - 4*a*c)*log(-(2*c^2*cos(x)^2 + 2*b*c*cos(x) + b^2 - 2*a*c + sqrt(b^2 -
4*a*c)*(2*c*cos(x) + b))/(c*cos(x)^2 + b*cos(x) + a)) - 2*(b^2*c - 4*a*c^2)*cos(x) + (b^3 - 4*a*b*c)*log(c*cos
(x)^2 + b*cos(x) + a))/(b^2*c^2 - 4*a*c^3), -1/2*(2*(b^2 - 2*a*c - 2*c^2)*sqrt(-b^2 + 4*a*c)*arctan(-sqrt(-b^2
 + 4*a*c)*(2*c*cos(x) + b)/(b^2 - 4*a*c)) - 2*(b^2*c - 4*a*c^2)*cos(x) + (b^3 - 4*a*b*c)*log(c*cos(x)^2 + b*co
s(x) + a))/(b^2*c^2 - 4*a*c^3)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)**3/(a+b*cos(x)+c*cos(x)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.13827, size = 103, normalized size = 1.36 \begin{align*} \frac{\cos \left (x\right )}{c} - \frac{b \log \left (c \cos \left (x\right )^{2} + b \cos \left (x\right ) + a\right )}{2 \, c^{2}} + \frac{{\left (b^{2} - 2 \, a c - 2 \, c^{2}\right )} \arctan \left (\frac{2 \, c \cos \left (x\right ) + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{\sqrt{-b^{2} + 4 \, a c} c^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^3/(a+b*cos(x)+c*cos(x)^2),x, algorithm="giac")

[Out]

cos(x)/c - 1/2*b*log(c*cos(x)^2 + b*cos(x) + a)/c^2 + (b^2 - 2*a*c - 2*c^2)*arctan((2*c*cos(x) + b)/sqrt(-b^2
+ 4*a*c))/(sqrt(-b^2 + 4*a*c)*c^2)